/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.fii.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Zeus
 */
@Entity
@Table(name = "pg_tmp_cursosaperturar", catalog = "prog_acad", schema = "")
@NamedQueries({
    @NamedQuery(name = "PgTmpCursosaperturar.findAll", query = "SELECT p FROM PgTmpCursosaperturar p"),
    @NamedQuery(name = "PgTmpCursosaperturar.findByPgcodCurso", query = "SELECT p FROM PgTmpCursosaperturar p WHERE p.pgTmpCursosaperturarPK.pgcodCurso = :pgcodCurso"),
    @NamedQuery(name = "PgTmpCursosaperturar.findByPgnombreCurso", query = "SELECT p FROM PgTmpCursosaperturar p WHERE p.pgnombreCurso = :pgnombreCurso"),
    @NamedQuery(name = "PgTmpCursosaperturar.findByPgcodFacultad", query = "SELECT p FROM PgTmpCursosaperturar p WHERE p.pgTmpCursosaperturarPK.pgcodFacultad = :pgcodFacultad"),
    @NamedQuery(name = "PgTmpCursosaperturar.findByPgcodEscuela", query = "SELECT p FROM PgTmpCursosaperturar p WHERE p.pgTmpCursosaperturarPK.pgcodEscuela = :pgcodEscuela"),
    @NamedQuery(name = "PgTmpCursosaperturar.findByPgCreditos", query = "SELECT p FROM PgTmpCursosaperturar p WHERE p.pgCreditos = :pgCreditos"),
    @NamedQuery(name = "PgTmpCursosaperturar.findByPgCiclo", query = "SELECT p FROM PgTmpCursosaperturar p WHERE p.pgCiclo = :pgCiclo"),
    @NamedQuery(name = "PgTmpCursosaperturar.findByPgcantAlumnos", query = "SELECT p FROM PgTmpCursosaperturar p WHERE p.pgcantAlumnos = :pgcantAlumnos")})
public class PgTmpCursosaperturar implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected PgTmpCursosaperturarPK pgTmpCursosaperturarPK;
    @Basic(optional = false)
    @Column(name = "pg_nombreCurso", nullable = false, length = 50)
    private String pgnombreCurso;
    @Basic(optional = false)
    @Column(name = "pg_creditos", nullable = false)
    private int pgCreditos;
    @Basic(optional = false)
    @Column(name = "pg_ciclo", nullable = false, length = 20)
    private String pgCiclo;
    @Basic(optional = false)
    @Column(name = "pg_cantAlumnos", nullable = false)
    private int pgcantAlumnos;

    public PgTmpCursosaperturar() {
    }

    public PgTmpCursosaperturar(PgTmpCursosaperturarPK pgTmpCursosaperturarPK) {
        this.pgTmpCursosaperturarPK = pgTmpCursosaperturarPK;
    }

    public PgTmpCursosaperturar(PgTmpCursosaperturarPK pgTmpCursosaperturarPK, String pgnombreCurso, int pgCreditos, String pgCiclo, int pgcantAlumnos) {
        this.pgTmpCursosaperturarPK = pgTmpCursosaperturarPK;
        this.pgnombreCurso = pgnombreCurso;
        this.pgCreditos = pgCreditos;
        this.pgCiclo = pgCiclo;
        this.pgcantAlumnos = pgcantAlumnos;
    }

    public PgTmpCursosaperturar(String pgcodCurso, String pgcodFacultad, String pgcodEscuela) {
        this.pgTmpCursosaperturarPK = new PgTmpCursosaperturarPK(pgcodCurso, pgcodFacultad, pgcodEscuela);
    }

    public PgTmpCursosaperturarPK getPgTmpCursosaperturarPK() {
        return pgTmpCursosaperturarPK;
    }

    public void setPgTmpCursosaperturarPK(PgTmpCursosaperturarPK pgTmpCursosaperturarPK) {
        this.pgTmpCursosaperturarPK = pgTmpCursosaperturarPK;
    }

    public String getPgnombreCurso() {
        return pgnombreCurso;
    }

    public void setPgnombreCurso(String pgnombreCurso) {
        this.pgnombreCurso = pgnombreCurso;
    }

    public int getPgCreditos() {
        return pgCreditos;
    }

    public void setPgCreditos(int pgCreditos) {
        this.pgCreditos = pgCreditos;
    }

    public String getPgCiclo() {
        return pgCiclo;
    }

    public void setPgCiclo(String pgCiclo) {
        this.pgCiclo = pgCiclo;
    }

    public int getPgcantAlumnos() {
        return pgcantAlumnos;
    }

    public void setPgcantAlumnos(int pgcantAlumnos) {
        this.pgcantAlumnos = pgcantAlumnos;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pgTmpCursosaperturarPK != null ? pgTmpCursosaperturarPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PgTmpCursosaperturar)) {
            return false;
        }
        PgTmpCursosaperturar other = (PgTmpCursosaperturar) object;
        if ((this.pgTmpCursosaperturarPK == null && other.pgTmpCursosaperturarPK != null) || (this.pgTmpCursosaperturarPK != null && !this.pgTmpCursosaperturarPK.equals(other.pgTmpCursosaperturarPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.fii.entity.PgTmpCursosaperturar[ pgTmpCursosaperturarPK=" + pgTmpCursosaperturarPK + " ]";
    }
    
}
